//登录泛型
import request from '@/utils/request'
export interface useLogin{
    username:string,
    password:string
}
interface TokenData{
   token:string
}
export interface Getinfo{
    "routes":string[],
    "buttons":string[],
    "roles":string[],
    "name":string,
    "avatar":string
}
export default {
    // GET /admin/acl/index/info
    // info
    getInfo(){
        return request.get<any,Getinfo>('/admin/acl/index/info')
    },
    // POST /admin/acl/index/login
    // login
     useLogin(useLogin:useLogin){
        return request.post<any,TokenData>('/admin/acl/index/login',useLogin)
     },
    // POST /admin/acl/index/logout
    // logout
    OutLogin(){
        return request.post<any,null>('/admin/acl/index/logout')
    }

}